package com.typ.member.common.utils;

import java.util.UUID;

/**
 * @author heran
 * @version 1.0, 2019-05-07 18:22
 */
public class CodeUtil {

    public static String generateCode(String name) {
        return UUID.fromString(name).toString().replaceAll("-", "").substring(0, 16);
    }

    public static String generateCode() {
        return UUID.randomUUID().toString().replaceAll("-", "").substring(0, 16);
    }
}
